Description
The description is stored together with the currently selected element, for example with the described variant, test case, or testlet. The description can be added to the test report by using the following two functions in an Script assesslet: ${tpt.scenario.comment}
, ${tpt.scenario.inheritedcomment}
.
A new report section called MY TEST DESCRIPTION is created and the inherited description is added to this newly created section. #create a new report section to insert inherited descriptions to each test case #create a variable and apply a function to generate a new section in the report test_description = TPTReport.Section("MY TEST DESCRIPTION") #give the new section an ID test_description.setID("secID") #add a report element to the new section, read the preference variable "inheritedcomment" test_description.add(TPTReport.add(r"""${tpt.scenario.inheritedcomment}""")) #call the function to add the section TPTReport.add (test_description) |